import ajax from "@/utils/request";

interface iTel {
    tel: string
    telcode?: string
    password?: string
}
// 验证手机号是否存在
export function docheckphoneFn(data: iTel) {
    return ajax({
        url: '/user/docheckphone',
        method: "POST",
        data
    })
}

// 发送验证码的接口
export function dosendmsgcodeFn(data: iTel) {
    return ajax({
        url: '/user/dosendmsgcode',
        method: "POST",
        data
    })
}
// /user/docheckcode
// 验证  验证码是否正确
export function docheckcodeFn(data: iTel) {
    return ajax({
        url: '/user/docheckcode',
        method: "POST",
        data
    })
}

// 提交注册
export function dofinishregisterFn(data: iTel) {
    return ajax({
        url: '/user/dofinishregister',
        method: "POST",
        data
    })
}

// 登录的接口
export function loginFn(data: { loginname: string, password: string }) {
    return ajax({
        url: '/user/login',
        method: "POST",
        data
    })
}
